<div class="portlet light bordered">
	<div class="portlet-title">
        <div class="caption font-dark">
            <i class="fa fa-cog font-dark"></i>
            <span class="caption-subject bold">编辑</span>
        </div>
    </div>
    <div class="portlet-body form">
    	<form role="form" action="/companyLevel/edit" class="form-horizontal" method="post">
        	<div class="form-body">
				<input type="hidden" name="id" value="$!item.id">
				<div class="form-group">
                	<label class="control-label col-md-3">等级名称：</label>
                    <div class="col-md-9">
                        <input type="text" class="form-control" name="name" value="$!item.name" required maxlength="10" placeholder="注:(名称长度在10字以内)">
                    </div>
                </div>
                <div class="form-group">
                	<label class="control-label col-md-3">等级显示：</label>
                    <div class="col-md-9">
                        <input type="text" class="form-control" name="alias" value="$!item.alias" required onkeyup="value=value.replace(/[^\w\@\.]/ig,'')" placeholder="注:(只能输入英文和数字，列如：A,B,V1,V2等)">
                    </div>
                </div>
                <div class="form-group">
                	<label class="control-label col-md-3">折扣率：</label>
                    <div class="col-md-9">
                        <input type="text" class="form-control" name="discount" value="$!item.discount" required onkeyup="this.value=this.value.replace(/\D/g,'')"  onafterpaste="this.value=this.value.replace(/\D/g,'')" onchange="if(!/(^0$)|(^100$)|(^\d{1,2}$)/.test(value)){value='';alert('输入数字只能在0-100之间!');}" placeholder="注:(折扣率只能输入数字)">
                    </div>
                </div>
                <div class="form-group">
                     <label class="control-label col-md-3">启用状态：</label>
                     <div class="col-md-9">
						<div class="mt-radio-inline">
							<label class="mt-radio">
							<input type="radio" name="status"  value="true"   #if($!item.status) checked #end>是
                          <span></span>
                        </label>
                        <label class="mt-radio">
                           <input type="radio" name="status"  value="false"  #if(!$!item.status) checked #end >否
                           <span></span>  
                       </label>
						</div>
                     </div> 
                 </div>
            </div>
            <div class="form-actions right">
				<a href="javascript:;" thref="/companyLevel/list" resetUrl="$!PC_SITE/newCompanyCache" class="btn green reset-cache ajax-post"><i class="fa fa-check"></i> 提交</a>
				<a href="javascript:;" data-dismiss="modal" class="btn btn-outline grey-salsa">返回</a>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
CacheManage.init();
</script>
